package student.convert

import org.apache.flink.streaming.api.scala._

object WordCountStream {
  def main(args: Array[String]): Unit = {
    val env = StreamExecutionEnvironment.getExecutionEnvironment
    env.readTextFile("Input/Word.txt")
      .flatMap(_.split(" "))
      .map((_,1))
      .keyBy(_._1)
      .sum(1)
      .print()
    env.execute()
  }

}
